import { createRouter, createWebHashHistory,RouteRecordRaw } from "vue-router";

const routes: Array<RouteRecordRaw> = [
  // { path: "/", redirect: "/index" },
  {
    path: "/login",
    name: "login",
    component: () => import('../views/login/index.vue')
  },
  {
    path: "/index",
    name: "index",
    component: () => import('../views/index/index.vue')
  },
  {
    path: "/home",
    name: "home",
    component: () => import('../views/home/index.vue')
  },
  {
    path: "/publish",
    name: "publish",
    component: () => import('../views/publish/index.vue')
  },
  {
    path: "/article",
    name: "article",
    component: () => import('../views/article/index.vue')
  }
]

export const router = createRouter({
  history: createWebHashHistory(),
  routes: routes,
  strict: true,
  scrollBehavior: () => ({ left: 0, top: 0 }),
})